<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
        <ui:page binding="#{Sublineas.page1}" id="page1">
            <ui:html binding="#{Sublineas.html1}" id="html1">
                <ui:head binding="#{Sublineas.head1}" id="head1">
                    <ui:link binding="#{Sublineas.link1}" id="link1" url="/resources/stylesheet.css"/>
                </ui:head>
                <ui:body binding="#{Sublineas.body1}" id="body1" style="-rave-layout: grid">
                    <ui:form binding="#{Sublineas.form1}" id="form1" virtualFormsConfig="salvar | | table1:groupPanelBotones:botonGuardar , deshacer/eliminar | controlBorrarHF | table1:tableRowGroup1:tableColumn4:botonEliminar botonDeshacer botonAgregar gridPanelGlobal:table1:groupPanelBotones:botonRegresar controlBorrarHF">
                        <div style="left: 0px; top: 0px; position: absolute">
                            <jsp:include page="encab1.jspf"/>
                        </div>
                        <ui:hiddenField binding="#{Sublineas.controlBorrarHF}" id="controlBorrarHF"/>
                        <h:panelGrid binding="#{Sublineas.gridPanelGlobal}" id="gridPanelGlobal" style="left: 48px; top: 120px; position: absolute">
                            <ui:button action="#{Sublineas.button1_action}" binding="#{Sublineas.button1}" id="button1" mini="true" primary="true"
                                style="width: 71px" text="Cerrar"/>
                            <h:panelGrid binding="#{Sublineas.gridPanelTituloYAlerta}" columns="2" id="gridPanelTituloYAlerta">
                                <ui:staticText binding="#{Sublineas.titulo}" id="titulo"
                                    style="color: rgb(108, 154, 154); font-family: 'Times New Roman','Times',serif; font-size: 18px" text="Sublineas"/>
                                <ui:alert binding="#{Sublineas.alert1}" id="alert1"/>
                            </h:panelGrid>
                            <ui:table augmentTitle="false" binding="#{Sublineas.table1}" clearSortButton="true" id="table1" lite="true" paginateButton="true"
                                paginationControls="true" style="width: 366px" title="Sublineas" width="366">
                                <script><![CDATA[
/* ----- Functions for Table Preferences Panel ----- */
/*
 * Toggle the table preferences panel open or closed
 */
function togglePreferencesPanel() {
  var table = document.getElementById("form1:table1");
  table.toggleTblePreferencesPanel();
}
/* ----- Functions for Filter Panel ----- */
/*
 * Return true if the filter menu has actually changed,
 * so the corresponding event should be allowed to continue.
 */
function filterMenuChanged() {
  var table = document.getElementById("form1:table1");
  return table.filterMenuChanged();
}
/*
 * Toggle the custom filter panel (if any) open or closed.
 */
function toggleFilterPanel() {
  var table = document.getElementById("form1:table1");
  return table.toggleTableFilterPanel();
}
/* ----- Functions for Table Actions ----- */
/*
 * Initialize all rows of the table when the state
 * of selected rows changes.
 */
function initAllRows() {
  var table = document.getElementById("form1:table1");
  table.initAllRows();
}
/*
 * Set the selected state for the given row groups
 * displayed in the table.  This functionality requires
 * the 'selectId' of the tableColumn to be set.
 *
 * @param rowGroupId HTML element id of the tableRowGroup component
 * @param selected Flag indicating whether components should be selected
 */
function selectGroupRows(rowGroupId, selected) {
  var table = document.getElementById("form1:table1");
  table.selectGroupRows(rowGroupId, selected);
}
/*
 * Disable all table actions if no rows have been selected.
 */
function disableActions() {
  // Determine whether any rows are currently selected
  var table = document.getElementById("form1:table1");
  var disabled = (table.getAllSelectedRowsCount() > 0) ? false : true;
  // Set disabled state for top actions
  document.getElementById("form1:table1:tableActionsTop:deleteTop").setDisabled(disabled);
  // Set disabled state for bottom actions
  document.getElementById("form1:table1:tableActionsBottom:deleteBottom").setDisabled(disabled);
}]]></script>
                                <ui:tableRowGroup binding="#{Sublineas.tableRowGroup1}" id="tableRowGroup1" rows="10"
                                    sourceData="#{Sublineas.sct0019DataProvider}" sourceVar="currentRow">
                                    <ui:tableColumn binding="#{Sublineas.tableColumn1}" headerText="Codigo" id="tableColumn1" sort="SCT0019.CDGOSBLNEA">
                                        <ui:staticText binding="#{Sublineas.staticText1}" id="staticText1" text="#{currentRow.value['SCT0019.CDGOSBLNEA']}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{Sublineas.tableColumn2}" headerText="Producto" id="tableColumn2">
                                        <ui:staticText binding="#{Sublineas.staticText2}" id="staticText2" text="#{currentRow.value['SCT0019.CDGOPRDCTO']}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{Sublineas.tableColumn3}" headerText="Descripcion (Maximo 50 caracteres)" id="tableColumn3" sort="SCT0019.DSCRPCIONSBLNEA">
                                        <ui:staticText binding="#{Sublineas.staticText3}" id="staticText3" text="#{currentRow.value['SCT0019.DSCRPCIONSBLNEA']}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn align="center" binding="#{Sublineas.tableColumn4}" id="tableColumn4" width="89">
                                        <ui:button action="#{Sublineas.botonEliminar_action}" binding="#{Sublineas.botonEliminar}" id="botonEliminar"
                                            mini="true"
                                            onClick="if(confirm(&quot;Esta seguro de eliminar esta sublinea ?&quot;)){document.getElementById(&quot;form1:controlBorrarHF&quot;).value=&quot;BORRE&quot;}"
                                            primary="true" text="Eliminar"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn align="center" binding="#{Sublineas.tableColumn5}" id="tableColumn5">
                                        <ui:button action="#{Sublineas.button2_action}" binding="#{Sublineas.button2}" id="button2" mini="true" primary="true" text="Modificar"/>
                                    </ui:tableColumn>
                                </ui:tableRowGroup>
                                <!-- Actions (Top) -->
                                <f:facet name="actionsTop">
                                    <ui:panelGroup binding="#{Sublineas.groupPanelBotones}" id="groupPanelBotones">
                                        <ui:button action="#{Sublineas.botonAgregar_action}" binding="#{Sublineas.botonAgregar}" id="botonAgregar" mini="true"
                                            primary="true" style="width: 72px" text="Agregar "/>
                                        <ui:button action="#{Sublineas.botonGuardar_action}" binding="#{Sublineas.botonGuardar}" id="botonGuardar" mini="true"
                                            primary="true" style="width: 96px" text="Guardar Cambios" visible="false"/>
                                        <ui:button action="#{Sublineas.botonRegresar_action}" binding="#{Sublineas.botonRegresar}" id="botonRegresar"
                                            mini="true" primary="true" style="width: 96px" text="Ir a productos"/>
                                        <ui:button action="#{Sublineas.botonDeshacer_action}" binding="#{Sublineas.botonDeshacer}" id="botonDeshacer"
                                            mini="true" primary="true" style="width: 72px" text="Deshacer" visible="false"/>
                                    </ui:panelGroup>
                                </f:facet>
                            </ui:table>
                        </h:panelGrid>
                    </ui:form>
                </ui:body>
            </ui:html>
        </ui:page>
    </f:view>
</jsp:root>
